import axios from 'axios';

export const getSituationList = (params) => axios.get('/api/v1/situation/object/page', {params});

export const addSituation = (params) => axios.post('/api/v1/situation/object', params);

export const delSituation = (delId) => axios.delete('/api/v1/situation/object/'+delId,{});

export const getItemData = (objectId) => axios.get('api/v1/situation/object/object/'+objectId+'/item',{});

export const getMaterialData = (params) => axios.get('api/v1/event/material/common/page',{params});

export const addPackage = (eventId,params) => axios.post('api/v1/event/situation/package/event/'+eventId+'/assoc', params);

export const delPackage = (params) => axios.delete('/api/v1/event/situation/package/',{params});

export const takeEffectOrInvalid = (objectId,state) => axios.put('/api/v1/situation/object/'+objectId+'/state/'+state);